package com.example.bes013.single.ds.demo1.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.sql.DataSource;

@RestController
public class IndexController {

    @GetMapping(value = "/")
    public String helloBES() {
        return "welcome to use BES Application Server ~~~";
    }

    @Autowired
    private DataSource datasource;

    @GetMapping(value = "/datasource")
    public void datasource() {
        System.out.println(datasource.toString());
    }

}
